<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
    </ul>
    <script>
        // ...扩展运算符
        var lis = document.querySelectorAll('li');
        console.log(lis); // 伪数组
        var arr = [...lis];
        console.log(arr); // 数组

        console.log('-----分割线-----');
        
        // Array.form(arr, callback) 伪数组转数组
        var arrayLike = {
            '0': 1,
            '1': 2,
            '2': 3,
            'length': 3
        }
        console.log(arrayLike);
        var ary = Array.from(arrayLike);
        console.log(ary);

        var ary1 = Array.from(arrayLike, item => item * 2);
        console.log(ary1);

        // Array.find() 
        // Array.findIndex()
        // Array.includes() === indexOf
        let arr1 = [1, 2, 3];
        let bool = arr1.includes(2);
        console.log(bool);

        // 模板字符串 ``
        // startsWith() & endsWith()
        // repeat() 重复n次
    </script>
</body>
</html>